Image processing apparatus

ABSTRACT

Apparatus includes a change operator for detecting change factor information which causes the deterioration in the image; an iterative processing operator which iterates a processing cycle comprising; a first processing step to apply a first calculation to a first image utilizing the change factor information to generate a second image, calculating difference data between the deteriorated image and the second image; a second processing step to apply a second calculation to the second image utilizing the difference data to generate a third image; and a replacing step to replace the first image with the third image; wherein the processing cycle further includes (a) detecting whether a coincidence exists between the sign of a first difference data and the sign of a second difference data or not, and (b) increasing an absolute value of the difference data utilized in the second processing step when the coincidence is detected in step (a).

CROSS REFERENCE TO RELATED APPLICATIONS

This application claims priority to Japanese Patent Application No. 2006-204342 filed on Jul. 27, 2006, which is incorporated herein by reference in its entirety.

FIELD OF THE INVENTION

The present invention relates to an image processing apparatus.

BACKGROUND OF THE INVENTION

As has hitherto been known, when an image is captured by means of an image processing apparatus such as a camera, deterioration sometimes arises in an image. Factors responsible for deterioration of an image include hand shake arising during image-capturing operation, various aberrations of an optical system, distortion of a lens, and the like.

In order to correct hand shake arising in an image-capturing operation, use of a lens actuation system and a circuit processing system has been known. For instance, a system which detects hand shake of a camera and compensates for the hand shake by means of actuating a predetermined lens in synchronism with the thus detected hand shake has hitherto been known as the lens actuation system (see the abstract of Japanese Patent Laid-Open Publication No. Hei 6-317824). Another known circuit processing system detects fluctuations in the optical axis of a camera by means of an angular velocity sensor, acquires from the detected angular velocity or the like a transmission function representing a blur acquired during the image-capturing operation, and subjects the captured image to inverse transformation of the acquired transmission function, to thus restore an image (see the abstract of Japanese Patent Laid-Open Publication No. Hei 11-24122).

Various images other than ordinary captured images, such as X-ray images, microscopic images, and the like, have been known to undergo deterioration or changes because of shake or other reasons.

A camera adopting the hand shake correction described in Japanese Patent Laid-Open Publication No. Hei 6-317824 requires a space for hardware which drives a lens, such as a motor or the like, and becomes bulky. Moreover, such hardware or a drive circuit for driving the hardware is also required, which in turn adds to cost. In the case of correction of hand shake described in Japanese Patent Laid-Open Publication No. Hei 11-24122, the above-described drawbacks are eliminated, but the following problems are presented. Namely, an image is theoretically restored by means of inverse conversion of the acquired transmission function. However, in reality, difficulty is encountered in restoring an image, for the following two reasons.

First, the acquired transmission function is highly susceptible to noise, a shake information error, and the like. By means of these nominal fluctuations, a value may show great variation. Therefore, a corrected image acquired through inverse conversion may be far different from an image captured without hand shake. Thus, the transmission function cannot be actually utilized. Second, when inverse conversion is performed in consideration of noise or the like, there can also be adopted a method for estimating a solution by means of singular value decomposition of a solution to simultaneous equations. However, the volume of calculation used for estimation becomes astronomically huge, and the risk of a failure to solve the equations is high.

SUMMARY OF THE INVENTION

As mentioned above, the present invention provides an image processing apparatus having a realistic circuit processing system which prevents an increase in the size of an apparatus in the case of restoration of an image.

In order to solve the problem, the present invention provides an image processing apparatus comprising:

a processor for restoring a pre-change image, an image which should have been originally captured, or an image approximating the same (hereinafter called an original image) from source image data having undergone a change, such as deterioration, wherein the processor performs at least once:

iterative processing including generation of comparative data from arbitrary image data by utilization of change factor information data pertaining to a factor responsible for a change in an image;

comparison of a source image data, which are an object of comparison, with the comparative data;

generation of restored data by distribution of acquired difference data to the arbitrary image data by utilization of the change factor information data;

use of the restored data in place of the arbitrary image data, to thus iterate analogous processing; and

accelerated processing for distributing a first correction value, whose absolute value is larger than that of the difference data, in place of the difference data.

According to the present invention, the original image data are generated by means of generation of only predetermined data. Accordingly, no substantial increase in hardware is entailed, and the apparatus does not become bulky. There is iterated processing for generating comparative data from restored data and comparing the comparative data with source image data which are objects of comparison, to thus gradually acquire restored data close to the original image. Hence, realistic restoration operation is achieved. Therefore, there can be embodied an image processing apparatus which has a circuit processing system realistic for restoration of an image. Moreover, during iterative processing, there is performed at least once accelerated processing for increasing the quantity of distribution based on a difference between the comparative data and the source image data, by means of setting a correction value, so that restoration processing can be speeded up.

In order to solve the problem, another invention provides an image processing apparatus comprising:

a processor for restoring original image data from source image data, and a storage device for storing data, wherein:

the processor performs iterative processing including:

generation of comparative data from arbitrary image data by utilization of change factor information data pertaining to a factor responsible for a change in an image;

comparison of a source image data, which are an object of comparison, with the comparative data;

generation of restored data by distribution of acquired difference data to the arbitrary image data by utilization of the change factor information data, and use of the restored data in place of the arbitrary image data, to thus iterate analogous processing; and

accelerated processing for distributing, in place of the difference data, a first correction value whose absolute value is larger than that of Nδ and which has the same sign as that of the Nδ, when the difference data (also called Pδ) acquired before n−1^(th) processing and the difference data (also called Nδ) acquired in n^(th) processing have the same sign on condition that the number of iterative processing operations is set to “n” (“n” is an integer of two or more), and distributing, in place of the difference data, a second correction value whose absolute value is smaller than that of Nδ and which has the same sign as that of Nδ, when Pδ and Nδ differ from each other in terms of a sign; and further comprising:

processing for storing the first correction value or the second correction value, both of which are acquired in n^(th) processing, into a storage device, performing distribution analogous to distribution in accelerated processing by use of the stored data in place of Pδ at the time of n+1^(th) processing; and sequentially increasing the number of repetitions and sequentially correcting the stored data, to thus iterate distribution analogous to that in accelerated processing.

According to the present invention, the original image data are generated by means of generation of only predetermined data. Accordingly, no substantial increase in hardware is entailed, and the apparatus does not become bulky. There is iterated processing for generating comparative data from restored data and comparing the comparative data with source image data which are objects of comparison, to thus gradually acquire restored data close to the original image. Hence, realistic restoration operation is achieved. Therefore, there can be embodied an image processing apparatus which has a circuit processing system realistic for restoration of an image. Moreover, when a coincidence exists between the sign of Pδ and the sign of Nδ, the difference data δ can be deemed to be acquired in an essentially-stable manner. Accelerated processing for increasing the amount of distribution of a difference by means of the setting of the first correction value is included in iterative processing, to thus accelerate restoration processing. When no coincidence exists between the sign of the Pδ and the sign of the Nδ, the difference data δ are deemed to have become unstable through overall iterative processing. In n^(th) processing, the value used for distribution is minimized by means of setting a second correction value. Thus, there is prevented a problem of a delay in image restoration processing, which would otherwise be caused when a distribution value is set high with dependence on the difference data δ of inappropriate sign.

In addition to the above inventions, another invention provides an image processing apparatus, wherein the processor stops processing when the difference data have become equal to or smaller than a predetermined value or have become smaller than the predetermined value during iterative processing. In a case where this configuration is adopted, processing is terminated even when the difference has not attained zero. Hence, an increase in processing time can be prevented. Moreover, the difference data are set to a predetermined value or less, and hence approximate restored data become closer to the original image that have not yet undergone a change (deterioration or the like). Moreover, when noise or the like has arisen, there is apt to arise a case where the difference cannot attain zero. Even in such a case, processing is not iterated infinitely.

In addition to the above inventions, another invention provides an image processing apparatus, wherein the processor stops processing when the number of repetition has attained a predetermined number during iterative processing. In a case where this configuration is adopted, processing is terminated even when the difference has attained zero or failed to attain zero. Hence, an increase in processing time can be prevented. Moreover, processing is continued until a predetermined number of operations, and hence approximate restored data become closer to the original image that are to be the original for the source image and have not yet undergone a deterioration, or the like. Moreover, when noise or the like has arisen, there is apt to arise in reality a case where the difference cannot attain zero. Even in such a case, processing is not iterated infinitely.

In addition to the above inventions, another invention provides an image processing apparatus, wherein the processor performs processing for stopping processing in a case where the difference data are equal to or smaller than a predetermined value or smaller than a predetermined value when the number of repetition has attained a predetermined number during iterative processing, and for further iterating processing a predetermined number of times when the number of repetition exceeds the predetermined value or is equal to or higher than the same. The image processing apparatus of the present invention performs processing by combination of the number of operations with difference data. Hence, when compared with a case where limitations are merely imposed on the number of processing operations or difference data, processing can achieve a balance between the superior accuracy of restoration of an image and a short processing time.

In addition to the above inventions, another invention provides an image processing apparatus, wherein, at the time of accelerated processing, the processor takes as the first correction value a value which is determined by means of multiplying Pδ or Nδ by a coefficient of greater than one. When this configuration is adopted, the first correction value is set while taking, as a criterion, Pδ or Nδ acquired as difference data. Hence, a more appropriate first correction value can be set.

In addition to the above inventions, another invention provides an image processing apparatus, wherein, at the time of accelerated processing, the processor takes as the second correction value a value which is determined by means of multiplying Nδ or Pδ by a coefficient from −1 to 1. When this configuration is adopted, the second correction value is set while taking, as a criterion, Pδ or Nδ acquired as difference data. Hence, a more appropriate second correction value can be set.

In addition to the above inventions, another invention provides an image processing apparatus, wherein, in accelerated processing, the processor takes as the first correction value a value which is determined by means of multiplying Pδ or Nδ, whichever has the larger absolute value, by a coefficient of greater than one. When this configuration is adopted, the first correction value is set while taking, as a criterion, Pδ or Nδ acquired as difference data. Hence, a more appropriate first correction value can be set. Moreover, the first correction value is set while taking Pδ or Nδ, whichever has the larger absolute value, as a criterion, whereby accelerated processing can be made much faster.

In addition to the above inventions, another invention provides an image processing apparatus, wherein, in accelerated processing, the processor selects Pδ or Nδ, whichever has the smaller absolute value; and takes a value determined by multiplying Nδ by a coefficient from 0 to 1 as the second correction value when Nδ has been selected or a value determined by multiplying Pδ by a coefficient from −1 to 0 as the second correction value when Pδ has been selected. When this configuration is adopted, the second correction value is set while taking, as a criterion, Pδ or Nδ acquired as difference data. Hence, a more appropriate second correction value can be set. Moreover, the second correction value is set while taking Pδ or Nδ, whichever has the smaller absolute value, as a criterion, whereby a value provided for distribution based on the unstable difference data δ can be minimized.

In addition to the above inventions, another invention provides an image processing apparatus, wherein the processor initiates accelerated processing after the value of “n” has assumed 10 or more. When this configuration is adopted, a difference acquired at the outset of iterative processing is usually large. Therefore, the entire restoration processing can be made stable by means of preventing the distribution values from be being set so as to increase the difference.

In addition to the above inventions, another invention provides an image processing apparatus, wherein the processor takes, as an object to be compared with the predetermined value, absolute values of sets of difference data pertaining to a plurality of pixels forming the image; the difference data; a total sum of the sets of difference data pertaining to the respective pixels; a total sum of the absolute values of the sets of difference data pertaining to the respective pixels; or two or more thereof. When this configuration is adopted, a value to be compared with a predetermined value can be selected, as required, and hence appropriate processing can be performed according to the type of a source image, the state of a change, or the state of restoring operation

The present invention enables provision of an image processing apparatus having a realistic circuit processing system which prevents an increase in the size of an apparatus at the time of restoration of an image.

The invention will be more clearly comprehended by reference to the embodiments provided below. However, the scope of the invention is not limited to those embodiments.

BRIEF DESCRIPTION OF THE DRAWINGS

Preferred embodiments of the present invention will be described in detail based on the following figures, wherein:

FIG. 1 is a block diagram showing the principal configuration of an image processing apparatus according to an embodiment of the present invention;

FIG. 2 is an external perspective view showing the overview of the image processing apparatus shown in FIG. 1 and describing the positional layout of an angular velocity sensor;

FIG. 3 is a processing flowchart for describing a processing routine pertaining to an image restoration processing method (iterative processing) performed by a processing section of the image processing apparatus shown in FIG. 1;

FIG. 4 is a view for describing the concept of the processing method shown in FIG. 3;

FIG. 5 is a view for specifically describing the processing method shown in FIG. 3 by means of taking hand shake as an example, showing concentration of energy when there is no hand shake;

FIG. 6 is a view for specifically describing the processing method shown in FIG. 3 by means of taking hand shake as an example, showing image data acquired when there is no hand shake;

FIG. 7 is a view for specifically describing the processing method shown in FIG. 3 by means of taking hand shake as an example, showing divergence of energy arising when hand shake has occurred;

FIG. 8 is a view for specifically describing the processing method shown in FIG. 3 by means of taking hand shake as an example and a state where comparative data are generated from an arbitrary image;

FIG. 9 is a view for specifically describing the processing method shown in FIG. 3 by means of taking hand shake as an example and a state where difference data are generated by means of comparing comparative data with an original, blurred image that is to become an object of processing;

FIG. 10 is a view for specifically describing the processing method shown in FIG. 3 by means of taking hand shake as an example and a state where data are restored by means of distributing difference data and adding the thus-distributed difference data to an arbitrary image;

FIG. 11 is a view for specifically describing the processing method shown in FIG. 3 by means of taking hand shake as an example and a state where new comparative data are generated from restored data, and comparing an original, blurred image that is to become an object of processing with the comparative data, to thus generate difference data;

FIG. 12 is a view for specifically describing the processing method shown in FIG. 3 by means of taking hand shake as an example and a state where newly-generated difference data are distributed to thus generate newly-constructed data;

FIG. 13 is a processing flowchart for describing an accelerated processing routine according to the embodiment of the present invention;

FIG. 14 is a view showing a state where data are newly restored when the second iterative processing shown in FIG. 12 is caused to include the accelerated processing shown in FIG. 13;

FIG. 15 is a view showing a total sum of data pertaining to differences among pixels acquired at each time and data pertaining to differences among the pixels, which is acquired when the processing shown in FIG. 13 has been repeated 30 times and after performance of second accelerated processing or subsequent accelerated processing of the present embodiment;

FIG. 16 is a view showing a total sum of data pertaining to differences among pixels acquired at each time and data pertaining to differences among the pixels, which is acquired when the image restoration processing shown in FIG. 3 has been repeated 30 times and after performance of the accelerated processing of the present embodiment; and

FIG. 17 is a view showing changes in the total sum of absolute values of the data pertaining to the differences among the pixels shown in FIGS. 15 and 16 with reference to the number of iterative processing operations.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

An image processing apparatus of an embodiment of the present invention will be described hereunder by reference to the drawings. The image processing apparatus is assumed to be a camera for consumer use. However, the present invention can also be applied to monitoring cameras; TV cameras, handy video cameras, equipment of other applications such as endoscopic cameras, microscopes, binoculars, imaging diagnostic systems such as NMR imaging systems, or equipment other than cameras.

FIG. 1 shows the general configuration of an image processing apparatus 1. The image processing apparatus 1 comprises an image-capturing section 2 for capturing an image of a person or the like; a control system section 3 for driving the image-capturing section 2; and a processing section 4 for processing an image captured by the image-capturing section 2. The image processing apparatus 1 of the present embodiment further has a recording section 5 for recording an image processed by the processing section 4; a detection section 6 which is formed from an angular velocity sensor or the like and detects change factor information about a factor responsible for a change such as deterioration in an image; and a factor information storage section 7 for storing known change factor information which induces deterioration in an image or the like.

The image-capturing section 2 is a section having an image-capturing element, such as a CCD, a C-MOS, or the like, which converts into an electrical signal the light having passed through a lens or an image-capturing optical system having a lens. The control system section 3 controls individual sections in the image processing apparatus, such as the image-capturing section 2, the processing section 4, the recording section 5, the detection section 6, the factor information storage section 7, and the like.

The processing section 4 is made up of an image processing processor, and the processor is formed from hardware such as an ASIC (Application Specific Integrated Circuit). The processing section 4 generates a sampling frequency used for detecting vibrations such as hand shake to be detected, and supplies the detection section 6 with the sampling frequency. The processing section 4 also controls the start and end of vibration detection operation.

Further, there may arise a case where the processing section 4 stores image data which are to become a source for generation of comparative data to be described later. Moreover, the processing section 4 may also be formed from software rather than from hardware such as an ASIC. Although the recording section 5 is formed from semiconductor memory, magnetic recording means such as a hard disk drive or the like or optical recording means such as a DVD or the like may also be adopted.

As shown in FIG. 2, the detection section 6 has two angular velocity sensors for detecting the speed along an X axis and the speed along a Y axis, both of which are perpendicular to a Z axis that is an optical axis of the image processing apparatus 1. Incidentally, hand shake arising when an image is captured with a camera induces movements in the X, Y, and Z directions and pivotal movement about the Z axis. The motions that are most greatly affected by fluctuations are rotation about the Y axis and a rotation about the X axis. Even when these fluctuations are very slight, a captured image exhibits great blurring. Therefore, in the present embodiment, only two angular velocity sensors shown in FIG. 2 are provided, around the X and Y axes. However, in the interest of pursuing perfection, an angular velocity sensor may also be additionally fitted around the Z axis, or a sensor for detecting a movement in the direction X or the direction Y may also be additionally provided. The sensor employed in this apparatus may also be an angular acceleration sensor rather than an angular velocity sensor.

The factor information storage section 7 is a recording section for storing change factor information such as known deterioration factor information or the like; e.g., a point-processing function computed from an aberration of an optical system and/or detected vibration. The point-processing function recorded in the factor information storage section 7 is used by the processing section 4 during, e.g., restoration of an original image [an image which is to be acquired before being changed (hereinafter simply called a “pre-change image”), an image which is originally to be captured, or an image approximating either of these images] from a source image (an image having undergone deterioration, a change, or the like) captured most recently after computation of the point-processing function. A timing when operation for restoring an original image from a source image is to be performed can be determined as a timing which is delayed from the time when the source image has been captured, such as a timing when the power source for image-capturing purpose is deactivated; a timing when the processing section 4 remains inoperative; a timing when the operating rate of the processing section 4 is low; or the like. In such a case, the source image data stored in the recording section 5 and change factor information about the source image stored in the factor information storage section 7, such as a point-processing function or the like, are stored in a mutually-associated manner over a long period of time. As mentioned above, an advantage of delaying the timing when restoration of a source image is performed from the timing when the source image has been captured lies in the ability to lessen the burden of the processing section 4 imposed during image-capturing operation, which entails various processing operations.

The general description of an image restoration method for the processing section 4 of the image processing apparatus 1 of the present embodiment configured mentioned above will now be described by reference to FIG. 3.

In FIG. 3, reference symbol Io designates data pertaining to an arbitrary initial image previously stored in the recording section of the processing section 4. Reference symbol Io′ designates data which pertain to a deteriorated image of the initial image data Io and which are used for comparison. Reference symbol G denotes data which pertain to change factor information [=deterioration factor information (a point-processing function)] detected by the detection section 6 and are stored in the recording section of the processing section 4. Reference symbol Img′ denotes data pertaining to a source image.

Reference symbol δ designates data pertaining to a difference between the source image data Img′ and the comparative data Io′. Reference symbol “k” denotes a distribution ratio based on data pertaining to the change factor information. Reference symbol Io+n denotes data pertaining to a restored image (restored data) newly generated by means of distribution of the difference data δ in the initial image data Io on the basis of the change factor information data G. Reference symbol Img denotes original image data. A relationship between Img and Img′ is assumed to be expressed by Equation (1) provided below. Img′=Img*G  (1) Reference symbol “*” denotes an operator representing a convolution integral.

In some cases, the difference data δ may be a simple difference among corresponding pixels. In general, the difference data δ vary according to the change factor information data G and are represented by the following equation (2). δ=f(Img′, Img, G)  (2)

First, in a processing routine of the processing section 4, arbitrary image data Io are prepared (step S101). Data Img′ pertaining to a deteriorated source image may also be used as this initial image data Io. Alternatively, any image data, such as solid black, solid white, solid gray, a checkerboard pattern, or the like, may also be used. In step S102, arbitrary image data Io which are to become an initial image are substituted, into Equation (1), in lieu of Img, thereby determining comparative data Io′, which are a deteriorated image. Next, the source image data Img′ and the comparative data Io′ are compared with each other, to thus compute the difference data δ (step S103).

Next, in step S104, a determination is made as to whether or not the absolute value of each of sets of difference data δ among a plurality of pixels forming an image is less than a predetermined value. When the absolute values are greater than or equal to the predetermined value, processing for generating new data pertaining to a restored image (restored data) is performed in step S105. Specifically, the difference data δ are distributed to the arbitrary image data Io on the basis of the change factor information data G, to thus generate new restored data Io+n. Subsequently, processing pertaining to step S102, S103, and S104 is iterated.

In step S104, when the absolute values of the respective sets of data δ pertaining to differences among the pixels are smaller than the predetermined value, iterative processing is terminated. The restored data Io+n acquired at a point in time when iterative processing has been completed are estimated to be the original image data Img. Specifically, when the absolute values of the respective sets of data δ pertaining to the differences among the pixels have become smaller than the predetermined value, the restored data Io+n that have become the source of the comparative data Io+n′ become highly analogous to the original image data Img. Therefore, the restored data Io+n are estimated as the original image data Img. The initial image data Io and the change factor information data G may also have be stored in the recording section 5 in advance, and the data may be passed to the processing section 4, as required.

The concept of the above-mentioned iterative processing method is summarized as follows. Specifically, under this processing method, a solution to processing is solved not as an inverse problem but as an optimization problem for determining a reasonable solution. When the solution is solved as an inverse problem, solution of the inverse problem is theoretically possible, but is difficult in practice.

In the present embodiment, when processing is solved as an optimization problem, solution is effected on the premise of the following conditions.

(1) An output in response to an input is uniquely determined.

(2) When an output is the same, an input is the same.

(3) A solution is converged by means of performing iterative processing such that the same output is acquired, while an input is updated.

Put another way, as shown in FIGS. 4A and 4B, so long as the comparative data Io′ (Io+n′) that are analogous to the source image data Img′ can be generated, the initial image data lo or the restored data Io+n that are to be original data for generation of the comparative data become analogous to the original image data Img.

In the present embodiment, the sampling frequency of the angular velocity detection sensor is set so as to fall within a range of 60 Hz to 240 Hz. However, an angular velocity may also be detected every 5 μsec so as to be able to detect a high frequency. In the present embodiment, when each set of data is represented in eight bits (0 to 255), the value serving as a criterion for determining the differential data δ is presumed to assume a value of six. When the value is smaller than six; namely, five or less, processing is terminated. Raw data pertaining to shake detected by the angular velocity detection sensor do not correspond to actual shake when calibration of the sensor is insufficient. Therefore, in order to cause the detected shake to correspond to actual shake, when the sensor is not calibrated, the raw data detected by the sensor must be corrected; for example, the raw data are multiplied by a predetermined factor.

Details on the method for restoring hand shake shown in FIG. 3 (iterative processing pertaining to steps S102, S103, S104, and S105) are described by reference to FIGS. 5, 6, 7, 8, 9, 10, 11, and 12.

(Hand Shake Restoration Algorithm)

When there is no hand shake, light energy corresponding to a predetermined pixel converges on that pixel during an exposure time. In contrast, when there is hand shake, light energy is diverged to the pixels having moved during the exposure time. Moreover, when the shake having arisen in the exposure time is ascertained, the manner of divergence of energy during the exposure time is determined. Accordingly, a shake-free image can be generated from a blurred image.

For the sake of simplicity, the following explanations are given in relation to a one-dimensional horizontal direction. Pixels are assigned in sequence from left; namely, S−1, S, S+1, S+2, S+3, . . . , and attention is paid to a certain pixel S. When there is no shake, energy acquired during an exposure time concentrates on the pixel. Hence, the degree of concentration of energy is represented as “1.0.” FIG. 5 shows this state. A result of image-capturing operation performed at this time is shown in a table of FIG. 6. Data shown in FIG. 6 become the image data Img to be achieved when no deterioration has arisen in the image. Each of sets of data is expressed as 8-bit data (0 to 255).

It is assumed that shake has arisen during an exposure time; that shake has arisen in the S^(th) pixel for 50% ofthe exposure time; that shake has arisen in the S+1^(th) pixel during 30% of the exposure time; and that shake has arisen in the S+2^(th) pixel during 20% of the exposure time. The manner of divergence of energy is as illustrated in the table shown in FIG. 7. The data shown in FIG. 7 become the change factor information data G.

Shake is constant across all of the pixels and ascertained as a linear problem. When no upper shake (vertical shake) is assumed have arisen, the state of shake is as provided in a table shown in FIG. 8. Data shown as a “blurred image” in FIG. 8 correspond to the deteriorated source image data Img′. Specifically, 120 of, e.g., S−3 pixel, is diverged as 60 for an S−3 pixel, 36 for an S−2 pixel, and 24 for an S−1 pixel in accordance with a distribution ratio consisting of “10.5,” “0.3,” and “0.2.” Likewise, 60 corresponding to the S−2 pixel data is diverged to 30 for the S−2 pixel, 18 for the S−1 pixels, and 12 for the S pixel. The original image data Img is computed from the deteriorated source image data Img′ and the change factor information data G shown in FIG. 7.

Any image data can be adopted as the arbitrary image data Io shown in connection with step S101. However, the source image data Img′ acquired in step S100 are used for explanation of adoption of the arbitrary image data Io. Specifically, processing is initiated while there is defined Io=Img′. A label “input” in the table of FIG. 9 corresponds to the initial image data Io. This data Io; namely, Img′, and the change factor information data G described in connection with step S102 are subjected to convolution integration. For instance, in relation to 60 of a pixel S−3 of the initial image data Io, 30 is assigned to the pixel S−3; 18 is assigned to the pixel S−2; and 12 is assigned to the pixel S−1. Even in relation to other pixels, data are distributed in the same manner. Thus, the comparative data Io denoted as an output Io′ are generated. Therefore, the difference data δ pertaining to step S103 are determined as described in the bottom row in FIG. 9.

Subsequently, the magnitude of the difference data δ is determined in step S104. Specifically, when all of the sets of difference data δ pertaining to the respective pixels have assumed absolute values of less than 0.5, processing is terminated. The difference data δ shown in FIG. 9 do not comply with the above conditions, and hence processing proceeds to step S105. Specifically, the difference data δ are distributed to the arbitrary image data Io by use of the change factor information data G, to thus generate restored data Io+n denoted as a “next input” in FIG. 10. In this case, the restored data correspond to the first data, and hence are expressed as Io+1 in FIG. 10.

In relation to the distribution of the difference data δ, for example, a value of 15, which has been determined by multiplying pixel data 30 of S−3 by 0.5; namely, a proportion ratio of the pixel data 30 (the pixel S−3), is distributed to the pixel S−3. Further, a value of 4.5, which has been determined by multiplying pixel data 0.3 of the S−2 pixel by 0.3; i.e., a proportion ratio of the pixel data 15 of S−2, is distributed to the pixel S−2. A value of 1.84, which has been determined by multiplying pixel data 9.2 of S−1 by a proportion ratio of 0.2 assumed to have been delivered to the S−1 pixel, is distributed to the pixel S−1. The total quantity of data (i.e., the quantity of updated data) distributed to the pixel S−3 attains 21.34. This value is added to the initial image data Io (by use of the source image data Img′ in this embodiment), to thus generate restored data Io+1

As shown in FIG. 11, the restored data Io+1 become input image data (=the initial image data Io) in step S102, whereby processing pertaining to S102 is performed. Processing proceeds to step S103, where new difference data δ are generated. The magnitude of the new difference data δ is determined in step S104. When the new difference data are larger than a predetermined value, the new difference data δ are distributed to the previous restored data Io+1 in step S105, thereby generating new restored data Io+2 (see FIG. 12). Subsequently, upon completion of processing pertaining to step S102, new comparative data Io+2′ are generated from the restored data Io+2. Thus, after processing pertaining to steps S102, S103 has been performed, processing proceeds to step S104. Processing further proceeds to step S105 by means of the determination rendered in step S104. Such processing is iterated.

As mentioned above, as a result of repetition of processing pertaining to steps S102 to S105, the difference data δ become gradually smaller. When the difference data have become smaller than a predetermined value, shake-free original image data Img are obtained.

Under the previously-described hand shake restoration processing method (iterative processing pertaining to steps S102, S103, S104, and S105) shown in FIG. 3, processing performed by the processing section 4 is formed from software. However, processing may also be embodied by hardware comprising parts which are arranged to perform portions of processing in a sharing manner. Moreover, the change factor information data G include not only deterioration factor information data, but also information used for merely changing a picture or information used for enhancing an image in order to counter deterioration.

When the number of repetitions of processing is automatically or fixedly set by the image processing apparatus 1, the thus-set number of operations may also be altered by means of the change factor information data G. For example, when data pertaining to a certain pixel are distributed over a plurality of pixels because of shake, the number of repetitions of operations is increased. When the data are less dispersed, the number of repetitions of operations may also be decreased.

When the difference data δ diverge during iterative processing or the energy of the image data achieved after movement of energy has become greater rather than smaller, processing may be aborted. In order to determine whether or not the difference data have diverged, there can be adopted a method for determining that the difference data δ diverge when an average of the difference data δ has increased from a previous average. Alternatively, when an attempt is made to change an input to an anomalous value during iterative processing, processing may be aborted. For instance, in the case of eight bits, when a value to be altered exceeds 255, processing is aborted. When an attempt is made to change an input, which is new data, to an anomalous value during iterative processing, the input may be changed to a normal value rather than the anomalous value. For instance, in the case of eight bits (0 to 255), when an attempt is made to input data whose value exceeds 255, processing is performed while the input data are taken as a maximum value of 255.

When restored data, which are to become an output image, are generated, there may arise a case where data extending beyond the area of an image to be restored are generated depending on the change factor information data G. In such a case, the data extending beyond the area are input to an opposite side. When there are data which enter from outside the area, the data are preferably brought from the opposite side. For example, when data assigned to pixels located lower than a pixel XN1 are generated from data pertaining to the pixel XN1 located at the lowermost position in the area, the position comes to the outside of the area. Accordingly, there is performed processing for assigning the data to a pixel X11 which is located immediately above the pixel XN1 and at the topmost position. Similarly, data are assigned to a pixel X12 (adjacent to the pixel X11) which is located immediately above a pixel N2 adjacent to the pixel XN1 and in the topmost position.

There will now be described an embodiment where the speed of iterative processing is accelerated. This embodiment is example accelerated processing for increasing, on the basis of a predetermined criterion, the quantity of distribution of the difference data δ acquired from the comparative data Io′ and the source image data Img′. This embodiment will be described hereunder by reference to FIGS. 13, 14, 15, 16, and 17.

FIG. 13 is a processing flowchart employed when accelerated processing is added to the hand shake restoration processing method shown in FIG. 3 (i.e., iterative processing pertaining to steps S102, S103, S104, and S105). Processing operations corresponding to those pertaining to steps S102, S103, S104, and S105 shown in FIG. 3 are assigned the same reference numerals. Reference symbols J₁ and J₂ are coefficients to be multiplied by the difference data δ during accelerated processing. In the present embodiment, J₁ is set to 1.3, and J₂ is set to 0.1. Moreover, steps corresponding to accelerated processing are enclosed with a dotted line.

Step S201 is a stage where the value of the difference data δ is large and the original image data Img cannot yet be said to have been acquired. In this step, when the number of repetitions of repeated processing pertaining to steps S102, S103, S104, and S105 has exceeded a predetermined value (a constant), processing proceeds to accelerated processing. A difference acquired at the outset of iterative processing is usually large. Therefore, the entire restoration processing can be made stable by means of preventing the distribution values from being set so as to increase the difference. However, in the present embodiment, the constant is set to one, and accelerated processing is included in second and subsequent iterative processing. Specifics of second iterative processing are primarily described.

Step S202 is a stage where the sign of a difference Pδ acquired through first processing and the sign of a difference Nδ acquired through second processing are ascertained (i.e., the signs are determined to be positive or negative). In the course of the difference data δ gradually approaching zero through iterative processing, there is a case where the difference data δ change while maintaining a positive or negative value and a case where the difference data δ change while transforming one or more times from a positive value to a negative value or from a negative value to a positive value. The reason for this is that, when the difference data δ pertaining to a certain pixel have attained a negative value, a negative value is distributed to an adjacent pixel at the time of distribution of the difference data δ even when the pixel energy of the adjacent pixel is a positive value. For instance, the difference data δ of the pixel S+2 in FIG. 9 are determined to be “−1, 0.” However, when the data “−1, 0” are distributed as shown in FIG. 10, a negative value is distributed to the pixel S and S+1 whose pixel energy levels are positive values. Thus, the difference data δ pertaining to a certain pixel affect the pixel energies of surrounding pixels. Hence, during the course of iterative processing, the sign of the difference data δ can change.

When in step S202 a coincidence exists between the sign of the difference Pδ and the sign of the difference Nδ, the difference data δ can be deemed to have been acquired in an essentially-stable manner during the course of iterative processing. A coefficient of J1=1.3, which is larger than one, is multiplied by the difference Pδ or the difference Nδ, whichever has the larger absolute value (step S203). Accelerated processing is performed by means of increasing a distribution value through use of a corrected value cδ of the resultantly-acquired difference data δ (steps S207, S208). The reason why the difference Pδ or the difference Nδ, whichever has the larger absolute value, is selected as mentioned above (step S203) is because an attempt is made to further promote accelerated processing by means of increasing the second distribution value; namely, the n^(th) distribution value.

When in step S202 coincidence does not exist between the sign of the difference Pδ and the sign of the difference Nδ, the difference data δ have inverted from a positive sign to a negative sign or from a negative sign to a positive sign. Hence, during the course of iterative processing, the difference data δ are assumed to have become unstable, and an attempt is made to maintain the current state until distribution values, or the like, from the surrounding pixels become stable. A value to be supplied is minimized in second processing; namely, n^(th) processing. While the sign of the amount of distribution acquired in processing of this time is maintained unchanged, processing is caused to proceed to second iterative processing; that is, n^(th) iterative processing. When the sign of the difference Nδ acquired the n^(th) time is different from the sign of the difference Pδ acquired the n−1^(th) time, the difference data δ acquired in overall iterative processing are still unstable. Hence, a value used for distribution is assigned the same sign as that of the obtained difference data δ and is minimized in n^(th) processing in an attempt to make the difference data stable. Thus, there is prevented a delay in image restoration processing, which would otherwise be caused by means of setting a distribution value to a large value on the basis of the difference data δ of an inappropriate sign.

Specifically, a determination is made as to whether the absolute value of the first (n−1^(th)) difference Pδ is greater or smaller than the absolute value of the second (n^(th)) difference Nδ (step S204). When the difference data Pδ acquired through n−1^(th) iterative processing are smaller, the difference data Pδ are multiplied by a value of −J2=−0.1 acquired by multiplication of a coefficient J2 by −1 (step S205), thereby obtaining a corrected value cδ of the difference data δ. The sign of the corrected value cδ becomes equal to that of the difference Nδ acquired in the second time (the n^(th) time). This corrected value cδ is handled as the n+1^(th) Pδ (step S207). A determination is made as to whether the absolute value of the first (n−1^(th)) difference Pδ is greater or smaller than the absolute value of the second (n^(th)) difference Nδ (step S204). When the difference data Nδ acquired through n^(th) iterative processing are smaller, the difference data Nδ are multiplied by a coefficient J₂ (=0.1) (step S206), thereby obtaining a corrected value cδ of the difference data δ. This corrected value cδ is handled as the n+1^(th) difference data Pδ (step S207). As mentioned above, the reason why the difference Pδ or the difference Nδ, whichever has the smaller absolute value, is selected (steps S204, S205, and S206) is because the n^(th) distribution value is minimized to thus cause processing to proceed from a state where the difference data δ remain unstable to a state where the difference data become stable, during the course of iterative processing.

This corrected value cδ is set through second (n^(th)) processing (step S207). The corrected value cδ is temporarily stored in a storage device provided in the recording section of the processing section 4 until the corrected value is used as Pδ in third (n+1^(th)) processing (step S207). Subsequently, the storage device writes a corrected value cδ (step S207) newly set during third (n+1^(th)) processing over the corrected value cδ, to thus delete the old corrected value. Rewriting of the corrected value cδ in the storage device is repeated until accelerated processing is completed. When in step S202 a coincidence continually exists between the sign of the difference Pδ and the sign of the difference Nδ, cδ, a first corrected value, attains a value which is determined by cumulative multiplication of a coefficient J₁. The distribution value gradually becomes greater, and accelerated processing further proceeds in an accelerated manner. Conversely, when in step S202 a coincidence does not continually exist between the sign of the difference Pδ and the sign of the difference Nδ, cδ, a second corrected value, attains a value which is determined by cumulative multiplication of a coefficient J₂. The distribution value gradually becomes smaller; and, during the course of iterative processing, an attempt is made to effect rapid conversion from a state where the difference data δ become unstable to a state where the difference data δ become stable.

FIG. 14 shows the “amount of corrected update” (cδ) which is acquired from the “amount of update” (Nδ) and the “amount of previous update” (Pδ) via accelerated processing shown in FIG. 13 during the course of generation of new restored data in second iterative processing shown in FIG. 12.

FIG. 15 is a table where a total sum of the sets of difference data among the pixels and difference data pertaining to the pixels is displayed after thirty performances of iterative processing including accelerated processing of the present embodiment. FIG. 16 is a table where a total sum of the sets of difference data among the pixels and difference data pertaining to the pixels is displayed after thirty performances of iterative processing shown in FIG. 3 without performance of accelerated processing of the present embodiment. FIG. 17 is a view showing changes in the total sum of absolute values of the data pertaining to the differences among the pixels shown in FIGS. 15 and 16 with an increase in the number of iterative processing operations.

As can be seen from FIGS. 15, 16, and 17, the total sum of absolute values of the sets of difference data δ pertaining to respective pixels is understood to approach zero at a higher speed with an increase in the number of iterative processing operations when accelerated processing is performed rather than when accelerated processing is not performed. For instance, when the number of iterative processing operation performed in a case where accelerated processing is performed is sixteen times, the difference data δ pertaining to the respective pixels all have absolute values of 0.5 or less (FIG. 15). When accelerated processing is not performed and when the number of iterative processing operations has attained 25 times, all of the sets of difference data δ pertaining to the respective elements are understood to assume absolute values of less than 0.5 (FIG. 16).

Although the image processing apparatus 1 of the present embodiment has been described thus far, the present invention may also be carried out in various altered manners without departing from the gist of the present invention. For instance, accelerated processing may also be performed every other iterative processing operation or at intervals of two or more iterative processing operations. Before accelerated processing is initiated, iterative processing may also be performed 10 or more times. Any value falling within a range of e.g., 1.1 to 2.0, can be selected, as required, for the coefficient J₁. Moreover, any value falling within a range of, e.g., 0.001 to 0.9, can be selected, as required, for the coefficient J₂. The coefficient J₁ and/or the coefficient J₂ can be changed in accordance with a progress in iterative processing or the difference data δ. For instance, when iterative processing has been performed a predetermined number of times or more, the coefficient J₁ may be reduced. When the absolute value of the difference data δ is a predetermined value or more, the coefficient J₁ can be increased. Alternatively, when the absolute value of difference data δ is a predetermined value or less, the coefficient J₁ can be reduced. The same can also be applied to the coefficient J₂.

During processing pertaining to step S203 in FIG. 13, J₁ can be multiplied by Pδ or Nδ, whichever has the smaller absolute value. During processing pertaining to steps S204, S205, and S206, Pδ is multiplied by −J₂ when the absolute value of Pδ is greater than that of Nδ. Meanwhile, Nδ is multiplied by J₂ when the absolute value of Nδ is greater than that of Pδ. When no coincidence exists between the sign of Pδ and the sign of Nδ in step S202 shown in FIG. 13, processing pertaining to step S204 is omitted. Also, processing may proceed to either processing pertaining to step S205 or processing pertaining to step S206.

During accelerated processing of the present embodiment, when the number of iterative operations is taken as “n” (“n” is an integer of two or more), processing shown in FIG. 13 is performed while difference data acquired in the n−1^(th) operation is taken as Pδ and difference data acquired in the n^(th) operation is taken as Nδ. However, Pδ can also be taken as difference data acquired before the n−1^(th) operation.

During iterative processing of the present embodiment, the processing section 4 determines, in step S104 shown in FIGS. 3 and 13, whether or not all the absolute values of the sets of difference data δ acquired for the respective pixels forming an image are equal to or greater than a predetermined value. Alternatively, difference data acquired for each of the plurality of pixels forming an image may also be taken as an object to be compared with a predetermined value, and a determination may also be made on a per-pixel basis as to whether or not iterative processing is halted. Moreover, a total sum of sets of difference data pertaining to respective pixels, a total sum of absolute values of the sets of difference data pertaining to respective pixels, or two of the above-described four objects may also be taken as an object to be compared with a predetermined value. For example, a determination may also be made as to whether or not a value most separated from zero among the sets of difference data δ pertaining to the respective pixels and the total sum of the sets of difference data pertaining to the respective pixels fulfill separate standards. As mentioned above, appropriate processing can be performed according to the type of a source image, the state of a change, or the state of restoring operation, by means of appropriately selecting a value to be compared with a predetermined value.

In the above-mentioned embodiment, image data are taken as objects to be restored. However, the concept and technique of restoration can be applied to restoration of all digital data. For example, the concept and technique can be applied to, e.g., restoration of digital sound data or the like.

The above-described processing method may also be programmed. Alternatively, programmed data may also be stored in a storage medium; e.g., a CD, a DVD, or USB memory, so as to be readable for a computer. In this case, programmed data in a storage medium of the image processing apparatus 1 may be stored in a server outside of the image processing apparatus 1. When necessary, the programmed data may be downloaded for use. In such a case, the image processing apparatus 1 has communications means for downloading a program in the storage medium thereof.

PARTS LIST

-   1 processing apparatus -   2 image-capturing section -   3 control section -   4 processing section -   5 recording section -   6 detection section -   7 image storage section 

1. An image processing apparatus for restoring a deteriorated image comprising: a processor performing the following operations: a change factor detecting operator for detecting change factor information in the image; an iterative processing operator which iterates a processing cycle comprising; a first processing step to apply a first calculation to a first image utilizing the change factor information to generate a second image, a difference data acquiring step to calculate difference data between the deteriorated image and the second image, a second processing step to apply a second calculation to the second image utilizing the difference data to generate a third image, and a replacing step to replace the first image with the third image; wherein, the processing cycle further comprises: (a) checking the sign of a first difference data acquired by the difference data acquiring step of a present cycle; and (b) checking the sign of a second difference data acquired by the difference data acquiring step once cycle before, (c) detecting whether a coincidence exists between the sign of the first difference data and the sign of the second difference data or not, and (d) increasing an absolute value of the difference data utilized in the second processing step when the coincidence is detected in step (c).
 2. An image processing apparatus according to claim 1, wherein the iterative processing operator acquires the deteriorated image as the first image at the beginning of the processing cycle.
 3. An image processing apparatus according to claim 2 wherein the processing cycle of step (d) further comprises: a first selecting step to compare the absolute value of the first difference data and the absolute value of the second difference data, and to select the larger value, and a first multiplying step where the larger value selected in the first selecting step is multiplied by a predetermined coefficient larger than one and utilized as the difference data in the second processing step.
 4. An image processing apparatus according to claim 1 further comprising, a stabilizing step to decrease an absolute value of the difference data utilized in the second processing step while maintaining the sign of the difference data, when the coincidence is not detected in the coincidence detecting step.
 5. An image processing apparatus according to claim 4, wherein the stabilizing step further comprises, a second selecting step to compare the absolute value of the first difference data and the absolute value of the second difference data, and to select the smaller value, and a second multiplying step where the first difference data is multiplied by a predetermined coefficient larger than zero and smaller than one and utilized as the difference data in the second processing step, when the first difference data is selected by the second selecting step and the second difference data is multiplied by a predetermined value larger than minus one (−1) and smaller than zero and utilized as the difference data in the second processing step, when the second difference data is selected by the second selecting step. 